package cn.wolfcode.crm.web.controller;

import cn.wolfcode.crm.domain.RemoveHistory;
import cn.wolfcode.crm.query.RemoveHistoryQueryObject;
import cn.wolfcode.crm.service.IRemoveHistoryService;
import cn.wolfcode.crm.util.PageResult;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("removeHistory")
public class RomoveHistoryController {
    @Autowired
    public IRemoveHistoryService removeHistoryService;

    @RequestMapping("view")
    @RequiresPermissions(value = {"removeHistory:view", "部门列表"}, logical = Logical.OR)
    public String view() {
        return "removeHistory/removeHistory";
    }

    @ResponseBody
    @RequestMapping("query")
    public PageResult query(RemoveHistoryQueryObject qo) {
        return removeHistoryService.query(qo);
    }

    @RequestMapping("selectAll")
    @ResponseBody
    public List<RemoveHistory> selectAll() {

        return removeHistoryService.selectAll();
    }
    
}
